<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 21:44:19
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:44:19
-->
<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 20:37:20
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:42:41
-->
<template>
  <div>
    <h2>条件判断指令</h2>
    <p v-if="flag">123</p>
    <p v-show="flag">123</p>

    <hr />
    <p v-if="age > 18 && age < 30">111</p>
    <p v-else-if="age > 30">222</p>
    <p v-else>333</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      flag: true,
      age: 20,
    };
  },
};
</script>

<style>
h2 {
  color: red;
}
</style>
